<?php
class ORMv1myorder extends ORMBase {
  public function __construct() {
    parent::__construct('v1myorder');
  }

  public function __toEpObject($myManager, $epObject, $object) {
    $epObject->trackId = isset($object->trackId) ? $object->trackId : '';
    $epObject->createdDate = (isset($object->createdDate) && $object->createdDate) ? SimpleDate::toStamp($object->createdDate) : 0;
    $epObject->disposaldate = (isset($object->disposaldate) && $object->disposaldate) ? SimpleDate::toStamp($object->disposaldate) : 0;
    $epObject->disposaluserAccount = isset($object->disposaluserAccount) ? $object->disposaluserAccount : '';
    $epObject->disposalstatus = isset($object->disposalstatus) ? $object->disposalstatus : 0;
    $epObject->disposalmessage = isset($object->disposalmessage) ? $object->disposalmessage : '';
    $epObject->flag = isset($object->flag) ? $object->flag : '';
    $epObject->type = isset($object->type) ? $object->type : '';
    $epObject->date = (isset($object->date) && $object->date) ? SimpleDate::toStamp($object->date) : 0;
    $epObject->price = isset($object->price) ? $object->price : 0;
    $epObject->photoname = isset($object->photoname) ? $object->photoname : '';
    $epObject->photoprice = isset($object->photoprice) ? $object->photoprice : 0;
    $epObject->photohours = isset($object->photohours) ? $object->photohours : 0;
    $epObject->photopersons = isset($object->photopersons) ? $object->photopersons : 0;
    $epObject->photomakeup = isset($object->photomakeup) ? $object->photomakeup : '';
    $epObject->photooriginal = isset($object->photooriginal) ? $object->photooriginal : 0;
    $epObject->videoname = isset($object->videoname) ? $object->videoname : '';
    $epObject->videoprice = isset($object->videoprice) ? $object->videoprice : 0;
    $epObject->videohours = isset($object->videohours) ? $object->videohours : 0;
    $epObject->videopersons = isset($object->videopersons) ? $object->videopersons : 0;
    $epObject->videomakeup = isset($object->videomakeup) ? $object->videomakeup : '';
    $epObject->videooriginal = isset($object->videooriginal) ? $object->videooriginal : 0;
    $epObject->note = isset($object->note) ? $object->note : '';
    $epObject->customerId = isset($object->customerId) ? $object->customerId : 0;
    $epObject->finished = isset($object->finished) ? $object->finished : 0;
    $epObject->discount = isset($object->discount) ? $object->discount : 0;
    $epObject->isOrderDiscountSolved = isset($object->isOrderDiscountSolved) ? $object->isOrderDiscountSolved : 0;
    $epObject->isNoWeddingDaySolved = isset($object->isNoWeddingDaySolved) ? $object->isNoWeddingDaySolved : 0;
    $epObject->isPayment1FirstSolved = isset($object->isPayment1FirstSolved) ? $object->isPayment1FirstSolved : 0;
    $epObject->isPayment1SecondSolved = isset($object->isPayment1SecondSolved) ? $object->isPayment1SecondSolved : 0;
    $epObject->isPayment1ThirdSolved = isset($object->isPayment1ThirdSolved) ? $object->isPayment1ThirdSolved : 0;
    $epObject->isPayment1ForthSolved = isset($object->isPayment1ForthSolved) ? $object->isPayment1ForthSolved : 0;
    $epObject->isPayment2FirstSolved = isset($object->isPayment2FirstSolved) ? $object->isPayment2FirstSolved : 0;
    $epObject->isPayment2SecondSolved = isset($object->isPayment2SecondSolved) ? $object->isPayment2SecondSolved : 0;
    $epObject->isPayment3FirstSolved = isset($object->isPayment3FirstSolved) ? $object->isPayment3FirstSolved : 0;
    $epObject->isPayment3SecondSolved = isset($object->isPayment3SecondSolved) ? $object->isPayment3SecondSolved : 0;
    $epObject->isPayment4Solved = isset($object->isPayment4Solved) ? $object->isPayment4Solved : 0;
    $epObject->isBonusPaid = isset($object->isBonusPaid) ? $object->isBonusPaid : 0;
    $epObject->admAppr = isset($object->admAppr) ? $object->admAppr : 0;
    $epObject->discAdmAppr = isset($object->discAdmAppr) ? $object->discAdmAppr : 0;
    return $epObject;
  }

  public function __toObject($myManager, $epObject, $object) {
    $object->id = $epObject->oid;
    $object->trackId = $epObject->trackId;
    $object->createdDate = ($epObject->createdDate != 0) ? SimpleDate::fromStamp($epObject->createdDate) : 0;
    $object->disposaldate = ($epObject->disposaldate != 0) ? SimpleDate::fromStamp($epObject->disposaldate) : 0;
    $object->disposaluserAccount = $epObject->disposaluserAccount;
    $object->disposalstatus = $epObject->disposalstatus;
    $object->disposalmessage = $epObject->disposalmessage;
    $object->flag = $epObject->flag;
    $object->type = $epObject->type;
    $object->date = ($epObject->date != 0) ? SimpleDate::fromStamp($epObject->date) : 0;
    $object->price = $epObject->price;
    $object->photoname = $epObject->photoname;
    $object->photoprice = $epObject->photoprice;
    $object->photohours = $epObject->photohours;
    $object->photopersons = $epObject->photopersons;
    $object->photomakeup = $epObject->photomakeup;
    $object->photooriginal = $epObject->photooriginal;
    $object->videoname = $epObject->videoname;
    $object->videoprice = $epObject->videoprice;
    $object->videohours = $epObject->videohours;
    $object->videopersons = $epObject->videopersons;
    $object->videomakeup = $epObject->videomakeup;
    $object->videooriginal = $epObject->videooriginal;
    $object->note = $epObject->note;
    $object->customerId = $epObject->customerId;
    $object->finished = $epObject->finished;
    $object->discount = $epObject->discount;
    $object->isOrderDiscountSolved = $epObject->isOrderDiscountSolved;
    $object->isNoWeddingDaySolved = $epObject->isNoWeddingDaySolved;
    $object->isPayment1FirstSolved = $epObject->isPayment1FirstSolved;
    $object->isPayment1SecondSolved = $epObject->isPayment1SecondSolved;
    $object->isPayment1ThirdSolved = $epObject->isPayment1ThirdSolved;
    $object->isPayment1ForthSolved = $epObject->isPayment1ForthSolved;
    $object->isPayment2FirstSolved = $epObject->isPayment2FirstSolved;
    $object->isPayment2SecondSolved = $epObject->isPayment2SecondSolved;
    $object->isPayment3FirstSolved = $epObject->isPayment3FirstSolved;
    $object->isPayment3SecondSolved = $epObject->isPayment3SecondSolved;
    $object->isPayment4Solved = $epObject->isPayment4Solved;
    $object->isBonusPaid = $epObject->isBonusPaid;
    $object->admAppr = $epObject->admAppr;
    $object->discAdmAppr = $epObject->discAdmAppr;
    return $object;
  }
}
?>
